package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.MemberCard;
import com.ruoyi.business.mapper.MemberCardMapper;
import com.ruoyi.business.service.IMemberCardService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MemberCardServiceImpl extends ServiceImpl<MemberCardMapper, MemberCard> implements IMemberCardService {

    @Resource
    private MemberCardMapper memberCardMapper;
    /**
     * 查询所有会员列表
     * @return Member集合
     */
    @Override
    public List<MemberCard> selectAllMemberCardList() {
        return memberCardMapper.selectAllMemberCardList();
    };
    /**
     * 查询Member列表
     *
     * @param memberCard MemberCard
     * @return Member集合
     */
    @Override
    public List<MemberCard> selectMemberCardList(MemberCard memberCard) {
        return memberCardMapper.selectMemberCardList(memberCard);
    };

    @Override
    public MemberCard getMemberCardById (Long id) {
        System.out.println("id:" + id);
        return memberCardMapper.selectById(id);
    };

    /**
     * 更新Member数据
     *
     * @param memberCard MemberCard
     */
    @Override
    public int insertMemberCard(MemberCard memberCard) {
        return memberCardMapper.insertMemberCard(memberCard);
    };

    /**
     * 更新Member数据
     *
     * @param memberCard memberCard
     */
    @Override
    public int updateMemberCard(MemberCard memberCard) {
        return memberCardMapper.updateMemberCard(memberCard);
    };

    @Override
    public int deleteMemberCardByIds(Long[] ids) {
        return memberCardMapper.deleteMemberCardByIds(ids);
    };
}
